/**
 * Author: Dmitry Ustimov
 * Date: 5/22/13
 * Time: 2:17 PM
 */

package com.gmail.dmitryustimov.ms.java7.visitor.mod_reflective.work.demo.structure1_3_9;

import com.gmail.dmitryustimov.ms.java7.patternslib.visitor.reflective.Visitor;

public class ConcreteElementVisitor extends Visitor {

    public ConcreteElementVisitor(String visitMethodName) {
        super(visitMethodName);
    }

    private void printElement(Element element) {
    }

    private void visitElements(Element element) {
        for(Element elem : element.elements) {
            this.visit(elem);
        }
    }

    public void visit(ElementRoot element) {
        printElement(element);
        visitElements(element);
    }

    public void visit(ElementA element) {
        printElement(element);
        visitElements(element);
    }

    public void visit(ElementB element) {
        printElement(element);
        visitElements(element);
    }

    public void visit(ElementC element) {
        printElement(element);
        visitElements(element);
    }

    public void visit(ElementA1 element) {
        printElement(element);
    }

    public void visit(ElementA2 element) {
        printElement(element);
    }

    public void visit(ElementA3 element) {
        printElement(element);
    }

    public void visit(ElementB1 element) {
        printElement(element);
    }

    public void visit(ElementB2 element) {
        printElement(element);
    }

    public void visit(ElementB3 element) {
        printElement(element);
    }

    public void visit(ElementC1 element) {
        printElement(element);
    }

    public void visit(ElementC2 element) {
        printElement(element);
    }

    public void visit(ElementC3 element) {
        printElement(element);
    }
}
